import { MyIcon } from "@/components/MyIcon";
// import { useAppStore } from "@/store/modules/app";
// import { computed, unref } from "vue";
export const useRenderMenuTitle = () => {
  // const appStore = useAppStore();
  // const Collapse = computed(() => appStore.collapse);
  // console.log(Collapse);

  const renderMenuTitle = (meta: any) => {
    const { title, icon } = meta;
    if (!icon) {
      return <span>{title}</span>;
    } else {
      return (
        <>
          <MyIcon icon={icon}></MyIcon>
          <span>{title}</span>
        </>
      );
    }
  };

  return { renderMenuTitle };
};
